/*
 * 岗位权限
 */
import { getRequest, postRequest } from '/@/lib/axios';

export const quarterApi = {
  /**
   * @description: 获取所有岗位
   * @param {*}
   * @return {*}
   */
  queryAll: () => {
    return getRequest('/sys/quarter/queryAll');
  },
  /**
   * @description:更新岗位
   * @param {*}
   * @return {*}
   */
  updateQuarter: (data) => {
    return postRequest('/sys/quarter/save', data);
  },
  /**
   * @description: 删除岗位
   * @param {number} quarterId
   * @return {*}
   */
  deleteQuarter: (quarterId) => {
    return getRequest(`/sys/quarter/delete?quarterId=${quarterId}`);
  },
  /**
   * @description: 获取岗位成员-员工列表
   * @param {*}
   * @return {*}
   */
  queryQuarterEmployee: (params) => {
    return postRequest('/sys/quarter/quarterRelateUserPage', params);
  },
  /**
   * @description: 获取非绑定员工-员工列表
   * @param {*}
   * @return {*}
   */
  queryEmployee: (params) => {
    return postRequest('/sys/quarter/findQuarterNotRelateUser', params);
  },
  /**
   * @description: 角色成员列表中批量添加/取消员工
   * @param  data
   * @return {*}
   */
  relateOrCancelUserAuth: (data) => {
    return postRequest('/sys/quarter/relateOrCancelUserAuth', data);
  },
};
